import json
import sys,numpy,os
# sys.path.append("..")
# from 查找没用的图片 import listDir
with open('/Users/wangshuguan/陕西省全部数据.txt') as f:
    str = f.read()
    j = json.loads(str)
    print(len(j))
#     print(len(numpy.unique(numpy.array([x["entpcode"] for x in j]))))

with open('/Users/wangshuguan/江苏省设计企业.txt') as f:
    str = f.read()
    j = json.loads(str)
    print(len(j))

# lists = os.listdir("/Users/wangshuguan/江苏省企业资质")
# 
# nplist = numpy.array([x.split("_")[2] for x in lists if x!=".DS_Store"])
# 
# print(len(nplist))
# print(len(numpy.unique(nplist)))
        
# print(lists[0].split("_")[2])
# print(len(nplist))
# for x in range(0,46287):
#     hasfile = False
#     for f in lists:
#         if f.startswith(f"企业_{x}_"):
#             hasfile = True
#     if not hasfile:
#         print(f"{x} no file")
#     if x % 1000 == 0:
#         print(x)
# print('over')